class Myerror(Exception):
    pass
list=[i for i in range(1,11) ]
it=iter(list)
while True:
    try:
        b=next(it)
        if b <=8:
            print(b*'*')
        else:
            raise Myerror
    except Exception:
       pass

